package io.xxx.mario.task.api;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class CreateTaskRequest extends AbstractTaskRequest {

    private Long createdId;

    private String createdName;

    @Override
    public void validate() {
        super.validate();
        if (createdId == null) {
            throw new IllegalArgumentException("任务创建人ID为空");
        }
        if (createdName == null) {
            throw new IllegalArgumentException("任务创建人姓名为空");
        }
    }
}
